package com.huawei.translate.persistence;

import com.huawei.translate.model.Renter;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RenterRepository extends IRepository<Renter, String> {

    List<Renter> findByAppKey(String appKey);

    @Cacheable("renterBySecret")
    Renter findByAppSecret(String appSecret);

    Renter findById(String id);
}
